package com.loong.uiframetest;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;

import com.loong.uiframetest.Adapter.SwipeLayoutRecyclerViewAdapter;

import java.util.ArrayList;
import java.util.List;

public class AndroidSwipeLayoutTest extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_android_swipe_layout_test);
        RecyclerView recyclerView = findViewById(R.id.swipe_layout_recycler_test);
        List<String> list=new ArrayList<>();
        for(int i=0;i<40;i++){
            list.add("测试用例:"+(i+1));
        }
        SwipeLayoutRecyclerViewAdapter myRecyclerViewAdapter=new SwipeLayoutRecyclerViewAdapter(this,list);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        recyclerView.setAdapter(myRecyclerViewAdapter);
    }
}
